
#ifndef LOD_BALL_H
#define LOD_BALL_H

#include "../base/point3.h"
#include "../base/vector3.h"

class ball
{
    public:
    ball(float pos_x, float pos_y, float pos_z, 
         float vel_x, float vel_y, float vel_z,
         float Radius)
     : pos(pos_x, pos_y, pos_z),
       vel(vel_x, vel_y, vel_z),
       out(false),
       del(false),
       radius(Radius) {}

    ball() {}

    void move(float f)
    {
        ppos = pos;
        pos.x = pos.x + f*vel.x;
        pos.y = pos.y + f*vel.y;
        pos.z = pos.z + f*vel.z;
    }

    void restore_pos()
    {
        pos = ppos;
    }

    //! position of the center
    point3<float> pos;
    //! previous position of the center
    point3<float> ppos;
    //! velocity
    vector3<float> vel;
    bool out;
    unsigned plane;
    bool del;
    float radius;
};

#endif // LOD_BALL_H
